<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="box">
    <div class="item">

    </div>
</div>
<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>
<ol>
    <li>第一个</li>
    <li></li>
    <li>最后一个</li>
</ol>
<script>
    var item = document.querySelector('.item');
    console.log(item.parentNode);
    var ul = document.querySelector('ul');
    console.log(ul.children);
    var ol = document.querySelector('ol');
    console.log(ol.firstElementChild);
    console.log(ol.lastElementChild);
    console.log(ol.children[0]);
    console.log(ol.children[ol.children.length - 1]);
    console.log(ul.nextElementSibling);
    console.log(ul.previousElementSibling);
</script>
</body>
</html>